<script>
	import { mapMutations } from 'vuex'
	export default {
		onLaunch: function() {
			
		},
		onShow: function(opt) {
			if (opt.query.scene) {
				this.SET_SCENE(opt.query.scene)
			}
			let token = uni.getStorageSync('token') || '',
				systemAppId = uni.getStorageSync('systemAppId') || '',
				stock = uni.getStorageSync('stock') || '',
				userInfo = uni.getStorageSync('userInfo') || ''
			if (token) {
				this.SET_LOGIN({
					isLogin: true,
					token: token,
					systemAppId: systemAppId,
					stock: stock,
					userInfo: userInfo
				})
			}
		},
		onHide: function() {},
		methods: {
			...mapMutations(['SET_LOGIN', 'SET_SCENE']),
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	@import '@/static/styles/contentmixin.scss';
	@import '@/static/styles/iconfont.css';
</style>